using System;
using System.Threading;
using System.Net;
using System.Net.Sockets;
using System.Collections.Generic;
using ProtoScratch.Common;

namespace ProtoScratch.Client
{
	public class ScratchClient : ScratchSession
	{
		/// <summary>
		/// Initializes a new instance of the <see cref="ProtoScratch.Client.ScratchClient"/> class.
		/// </summary>
		public ScratchClient (Type impl, int port) : base (impl)
		{
			this.port = port;
		}
		
		/// <summary>
		/// Connect to the specified Host.
		/// </summary>
		/// <param name='Host'>
		/// This is the ProtoScratch compatible server t oconnect to.
		/// </param>
		public void connect(string Host)
		{
			lockSettings();

            try
            {
                var ThisClient = new TcpClient(Host, port);
                var Connection = new ClientConnection(this, ThisClient);
            } catch (Exception) {}
		}
	}
}

